package com.example.demo.controller;

import com.example.demo.result.JsonResult;
import com.example.demo.service.ScoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("score")
public class ScoreController {

    @Autowired
    private ScoreService scoreService;
    /**
     * 为每个同学生成分数
     * @return
     */
    @GetMapping("generateScore")
    public JsonResult generateScore(){
        scoreService.generateScore();
        return JsonResult.ok();
    }
}
